/*
 *  Copyright 2012 yura.
 * 
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 * 
 *       http://www.apache.org/licenses/LICENSE-2.0
 * 
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *  under the License.
 */

package org.opu.odg.dg.incomingdata;

import java.io.Closeable;
import java.io.Serializable;
import org.opu.odg.dg.impl.DocumentGenerationContext;
import org.opu.odg.dg.runtimedata.VariableHolder;
import org.simpleframework.xml.Attribute;
import org.simpleframework.xml.Root;

/**
 *
 * @author yura
 */
@Root
public abstract class ContentDescription implements Closeable, Cloneable, Serializable {

    /**
     * If this value is true this means that this content should push up at top,
     * for example when we open content inside 2 cell and want to describe row.
     */
    @Attribute(required=false)
    protected boolean describesExternalTag = false;

    /**
     * If this value is true this means that this content should push up at top,
     * for example when we open content inside 2 cell and want to describe row.
     * @return 
     */
    public boolean isDescribesExternalTag() {
        return describesExternalTag;
    }

    public void setDescribesExternalTag(boolean describesRxternalTag) {
        this.describesExternalTag = describesRxternalTag;
    }
    
    @Override
    public abstract ContentDescription clone();

    public abstract Iterable<ContextIteration> asIterable(
            DocumentGenerationContext context, VariableHolder variableHolder);

}
